Skip to content

feat(starship): add completion spec#2621

Open
nil957 wants to merge 1 commit intowithfig:masterfrom
nil957:feat/starship-spec
Open

feat(starship): add completion spec#2621
nil957 wants to merge 1 commit intowithfig:masterfrom
nil957:feat/starship-spec

Conversation

@nil957
Copy link
Copy Markdown

@nil957 nil957 commented Apr 9, 2026

Summary

Add autocomplete support for starship, the cross-shell prompt for astronauts.

Closes #1536

Features

Subcommands

All 13 subcommands are supported:

  • bug-report - Create a GitHub issue with configuration info
  • completions - Generate shell completions
  • config - Edit starship configuration
  • explain - Explain currently showing modules
  • init - Print shell init function
  • module - Print a specific prompt module
  • preset - Print preset configs
  • print-config - Print computed configuration
  • prompt - Print the full prompt
  • session - Generate random session key
  • timings - Print module timings
  • toggle - Toggle a starship module
  • help - Print help

Generators

  • Dynamic module generator that runs starship module -l to list all available modules for the module and toggle commands

Suggestions

  • Shell suggestions for init and completions commands (bash, elvish, fish, nushell, powershell, zsh)
  • All 12 preset names for the preset command
  • Keymap suggestions (viins, vicmd, main, emacs)

Options

  • All common prompt context options (--status, --path, --keymap, --jobs, etc.)
  • Subcommand-specific options

Testing

Tested with starship v1.24.2:

  • npm run build - Spec compiles successfully
  • npm run lint - No linting errors
  • Verified all subcommands and options match starship --help output

Add autocomplete support for starship, the cross-shell prompt for astronauts.

Included features:
- All 13 subcommands: bug-report, completions, config, explain, init,
  module, preset, print-config, prompt, session, timings, toggle, help
- Dynamic module generator for module and toggle commands
- Shell suggestions for init and completions commands
- Preset name suggestions
- Common prompt context options (status, path, keymap, jobs, etc.)

Closes withfig#1536
@withfig-bot
Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


Javis seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@withfig-bot
Copy link
Copy Markdown
Contributor

Overview

src/starship.ts:

Info:

@withfig-bot
Copy link
Copy Markdown
Contributor

Hello @nil957,
thank you very much for creating a Pull Request!
Here is a small checklist to get this PR merged as quickly as possible:

  • Do all subcommands / options which take arguments include the args property (args: {})?
  • Are all options modular? E.g. -a -u -x instead of -aux
  • Have all other checks passed?

Please add a 👍 as a reaction to this comment to show that you read this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[starship] missing spec

2 participants